# -*- mode: snippet -*-
# name: cpower Power Of Cox/Log-Rank Two-Sample Test
# key: Hmisc.cpower
# key: cpower
# contributor: Shuguang Sun
# --
Hmisc::cpower(
tref = 1,      # Assessment at 1 year
n = 2000,      # Total sample size
mc = 0.25,     # Mortality in control pexp(q = tref, rate = -log(0.5)/m)
r = 20,        # % decrease in by intervention (1 - hr ) * 100
accrual = 1,   # duration of enrollment period
tmin = 1,      # minimum follow-up time
noncomp.c = 0, # % non-compliant in control group (drop-ins)
noncomp.i = 0, # % non-compliant in intervention group (non-adherers)
alpha = 0.05,  # alpha error
nc = 1000,     # n in control
ni = 1000,     # n in intervention
pr = TRUE      # print details
)